\hypertarget{class_a_v_i_file}{
\section{AVIFile Class Reference}
\label{class_a_v_i_file}\index{AVIFile@{AVIFile}}
}


{\ttfamily \#include $<$avi.h$>$}Inheritance diagram for AVIFile::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{class_a_v_i_file}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_a_v_i_file_a590b7a973a107c19b0d5904872e645ee}{AVIFile} ()
\item 
\hyperlink{class_a_v_i_file_a37168aa6e6285dd24860a32c1501872c}{AVIFile} (const \hyperlink{class_a_v_i_file}{AVIFile} \&)
\item 
virtual \hyperlink{class_a_v_i_file_af7065ea3dc27ea02290f905e2535f75a}{$\sim$AVIFile} ()
\item 
virtual \hyperlink{class_a_v_i_file}{AVIFile} \& \hyperlink{class_a_v_i_file_aa3d26f26ef43c8da2bad6d30c88582b7}{operator=} (const \hyperlink{class_a_v_i_file}{AVIFile} \&)
\item 
virtual void \hyperlink{class_a_v_i_file_ae3cf3009dfda33f25eaef7eed374c18c}{Init} (int format, int sampleFrequency, int indexType)
\item 
virtual int \hyperlink{class_a_v_i_file_ad18c3fdbcae2b439987c31803cdabb75}{GetFrameInfo} (off\_\-t \&offset, int \&size, int frameNum)
\item 
virtual int \hyperlink{class_a_v_i_file_a468342fdddffd3aa4e3d33ed2232193d}{GetFrame} (\hyperlink{class_frame}{Frame} $\ast$frame, int frameNum)
\item 
\hypertarget{class_a_v_i_file_aee196a1595f5ac62a8ed5d3af37315b0}{
virtual int {\bfseries GetTotalFrames} ()}
\label{class_a_v_i_file_aee196a1595f5ac62a8ed5d3af37315b0}

\item 
virtual void \hyperlink{class_a_v_i_file_ac35dd7e4beb3da69fa6bbb79590f72e5}{PrintDirectoryEntryData} (const \hyperlink{class_r_i_f_f_dir_entry}{RIFFDirEntry} \&entry)
\item 
\hypertarget{class_a_v_i_file_a64c6c5d34a0752512c52a3bad0f538f5}{
virtual bool {\bfseries WriteFrame} (\hyperlink{class_frame}{Frame} $\ast$frame)}
\label{class_a_v_i_file_a64c6c5d34a0752512c52a3bad0f538f5}

\item 
virtual void \hyperlink{class_a_v_i_file_a39c7a8c8385b8c43e07ecb96f05b30f1}{ParseList} (int parent)
\item 
virtual void \hyperlink{class_a_v_i_file_aacc26adc57c2c19313089d4caeb72d2e}{ParseRIFF} (void)
\item 
\hypertarget{class_a_v_i_file_a5c0421dcaabbeff0ac175539394bc2b6}{
virtual void {\bfseries ReadIndex} (void)}
\label{class_a_v_i_file_a5c0421dcaabbeff0ac175539394bc2b6}

\item 
virtual void \hyperlink{class_a_v_i_file_a543c702c53cd565c31c32375941957ad}{WriteRIFF} (void)
\item 
\hypertarget{class_a_v_i_file_a472b49ce0bbaee73f4f43cfce2f9e24a}{
virtual void {\bfseries FlushIndx} (int stream)}
\label{class_a_v_i_file_a472b49ce0bbaee73f4f43cfce2f9e24a}

\item 
\hypertarget{class_a_v_i_file_abb48ce8085c8cd8bceebde40d90eae59}{
virtual void {\bfseries UpdateIndx} (int stream, int chunk, int duration)}
\label{class_a_v_i_file_abb48ce8085c8cd8bceebde40d90eae59}

\item 
\hypertarget{class_a_v_i_file_a99d92e11890f4033d109ea3635e3ec5f}{
virtual void {\bfseries UpdateIdx1} (int chunk, int flags)}
\label{class_a_v_i_file_a99d92e11890f4033d109ea3635e3ec5f}

\item 
\hypertarget{class_a_v_i_file_a3271dda7680410251fc02b8f19196913}{
virtual bool {\bfseries verifyStreamFormat} (FOURCC type)}
\label{class_a_v_i_file_a3271dda7680410251fc02b8f19196913}

\item 
\hypertarget{class_a_v_i_file_abe2da5ee1deebb7a0870556198803556}{
virtual bool {\bfseries verifyStream} (FOURCC type)}
\label{class_a_v_i_file_abe2da5ee1deebb7a0870556198803556}

\item 
\hypertarget{class_a_v_i_file_a0697199275eedaa109cd044851aff086}{
virtual bool {\bfseries isOpenDML} (void)}
\label{class_a_v_i_file_a0697199275eedaa109cd044851aff086}

\item 
\hypertarget{class_a_v_i_file_a01ed6929b6dd4edd4d119219b3f2d696}{
virtual void {\bfseries setDVINFO} (DVINFO \&)}
\label{class_a_v_i_file_a01ed6929b6dd4edd4d119219b3f2d696}

\item 
\hypertarget{class_a_v_i_file_a20e9024d50f73b1a75447d699d59f476}{
virtual void {\bfseries setFccHandler} (FOURCC type, FOURCC handler)}
\label{class_a_v_i_file_a20e9024d50f73b1a75447d699d59f476}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_a_v_i_file_aaa2dab0652bb843e406f0436f188100c}{
MainAVIHeader {\bfseries mainHdr}}
\label{class_a_v_i_file_aaa2dab0652bb843e406f0436f188100c}

\item 
\hypertarget{class_a_v_i_file_a33ce39e7f924a036ea17cb5044e69e7f}{
AVISimpleIndex $\ast$ {\bfseries idx1}}
\label{class_a_v_i_file_a33ce39e7f924a036ea17cb5044e69e7f}

\item 
\hypertarget{class_a_v_i_file_a491356e70a5ac5d6e6f93a1255a04967}{
int {\bfseries file\_\-list}}
\label{class_a_v_i_file_a491356e70a5ac5d6e6f93a1255a04967}

\item 
\hypertarget{class_a_v_i_file_ac2f7b10d8808288d23c7e081dc50d93e}{
int {\bfseries riff\_\-list}}
\label{class_a_v_i_file_ac2f7b10d8808288d23c7e081dc50d93e}

\item 
\hypertarget{class_a_v_i_file_a5503b96b5eb6d6f04ad8ee209b743ac1}{
int {\bfseries hdrl\_\-list}}
\label{class_a_v_i_file_a5503b96b5eb6d6f04ad8ee209b743ac1}

\item 
\hypertarget{class_a_v_i_file_af1de005f971c5aca59ca8e9d9126ea3f}{
int {\bfseries avih\_\-chunk}}
\label{class_a_v_i_file_af1de005f971c5aca59ca8e9d9126ea3f}

\item 
\hypertarget{class_a_v_i_file_a05bfee2b988af2aad5ee52bc2fd12b33}{
int {\bfseries movi\_\-list}}
\label{class_a_v_i_file_a05bfee2b988af2aad5ee52bc2fd12b33}

\item 
\hypertarget{class_a_v_i_file_a8febe29d268e86cf68976ae04824f859}{
int {\bfseries junk\_\-chunk}}
\label{class_a_v_i_file_a8febe29d268e86cf68976ae04824f859}

\item 
\hypertarget{class_a_v_i_file_a2502c149665247ca1f45db93240478a4}{
int {\bfseries idx1\_\-chunk}}
\label{class_a_v_i_file_a2502c149665247ca1f45db93240478a4}

\item 
\hypertarget{class_a_v_i_file_a2cb8836ee70e1329ae087902eb3c4ccc}{
AVIStreamHeader {\bfseries streamHdr} \mbox{[}2\mbox{]}}
\label{class_a_v_i_file_a2cb8836ee70e1329ae087902eb3c4ccc}

\item 
\hypertarget{class_a_v_i_file_afb275bfb9fe8af87262eb83e5d501b2d}{
AVISuperIndex $\ast$ {\bfseries indx} \mbox{[}2\mbox{]}}
\label{class_a_v_i_file_afb275bfb9fe8af87262eb83e5d501b2d}

\item 
\hypertarget{class_a_v_i_file_a717858a9edc2900d8bd45c1095c21ca1}{
AVIStdIndex $\ast$ {\bfseries ix} \mbox{[}2\mbox{]}}
\label{class_a_v_i_file_a717858a9edc2900d8bd45c1095c21ca1}

\item 
\hypertarget{class_a_v_i_file_ac3f4bef70d896f31e9a98e99a83ae3ae}{
int {\bfseries indx\_\-chunk} \mbox{[}2\mbox{]}}
\label{class_a_v_i_file_ac3f4bef70d896f31e9a98e99a83ae3ae}

\item 
\hypertarget{class_a_v_i_file_aacf53ebdcb82f33b7fc6aa6f91d2b69e}{
int {\bfseries ix\_\-chunk} \mbox{[}2\mbox{]}}
\label{class_a_v_i_file_aacf53ebdcb82f33b7fc6aa6f91d2b69e}

\item 
\hypertarget{class_a_v_i_file_a7cfe28c3bbae12a9bcc23d7de045f950}{
int {\bfseries strl\_\-list} \mbox{[}2\mbox{]}}
\label{class_a_v_i_file_a7cfe28c3bbae12a9bcc23d7de045f950}

\item 
\hypertarget{class_a_v_i_file_a3be5eafe84ed4e7a281b5841025913c2}{
int {\bfseries strh\_\-chunk} \mbox{[}2\mbox{]}}
\label{class_a_v_i_file_a3be5eafe84ed4e7a281b5841025913c2}

\item 
\hypertarget{class_a_v_i_file_a51d2a7d4889b0cc82f86d7851bcacc0b}{
int {\bfseries strf\_\-chunk} \mbox{[}2\mbox{]}}
\label{class_a_v_i_file_a51d2a7d4889b0cc82f86d7851bcacc0b}

\item 
\hypertarget{class_a_v_i_file_ad4d783bdf8c7f31f2b8e2066b9a7aeee}{
int {\bfseries index\_\-type}}
\label{class_a_v_i_file_ad4d783bdf8c7f31f2b8e2066b9a7aeee}

\item 
\hypertarget{class_a_v_i_file_a400ec0c238e8e50ba057a42e69ad51fc}{
int {\bfseries current\_\-ix00}}
\label{class_a_v_i_file_a400ec0c238e8e50ba057a42e69ad51fc}

\item 
\hypertarget{class_a_v_i_file_ad6656a81933963e79584a1cf84c6696e}{
DWORD {\bfseries dmlh} \mbox{[}62\mbox{]}}
\label{class_a_v_i_file_ad6656a81933963e79584a1cf84c6696e}

\item 
\hypertarget{class_a_v_i_file_a5fa626fae41611b5a608b8095a3eb9d7}{
int {\bfseries odml\_\-list}}
\label{class_a_v_i_file_a5fa626fae41611b5a608b8095a3eb9d7}

\item 
\hypertarget{class_a_v_i_file_ac40276a567d6e11ccbb2d7b2ddc9b782}{
int {\bfseries dmlh\_\-chunk}}
\label{class_a_v_i_file_ac40276a567d6e11ccbb2d7b2ddc9b782}

\item 
\hypertarget{class_a_v_i_file_a11b7036a759411c899e7ddc2b0e16b68}{
bool {\bfseries isUpdateIdx1}}
\label{class_a_v_i_file_a11b7036a759411c899e7ddc2b0e16b68}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
base class for all AVI type files

It contains methods and members which are the same in all AVI type files regardless of the particular compression, number of streams etc.

The \hyperlink{class_a_v_i_file}{AVIFile} class also contains methods for handling several indexes to the video frame content. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_a_v_i_file_a590b7a973a107c19b0d5904872e645ee}{
\index{AVIFile@{AVIFile}!AVIFile@{AVIFile}}
\index{AVIFile@{AVIFile}!AVIFile@{AVIFile}}
\subsubsection[{AVIFile}]{\setlength{\rightskip}{0pt plus 5cm}AVIFile::AVIFile ()}}
\label{class_a_v_i_file_a590b7a973a107c19b0d5904872e645ee}
The constructor

\begin{Desc}
\item[\hyperlink{todo__todo000001}{Todo}]mainHdr not initialized 

add checking for NULL pointers\end{Desc}
\hypertarget{class_a_v_i_file_a37168aa6e6285dd24860a32c1501872c}{
\index{AVIFile@{AVIFile}!AVIFile@{AVIFile}}
\index{AVIFile@{AVIFile}!AVIFile@{AVIFile}}
\subsubsection[{AVIFile}]{\setlength{\rightskip}{0pt plus 5cm}AVIFile::AVIFile (const {\bf AVIFile} \& {\em avi})}}
\label{class_a_v_i_file_a37168aa6e6285dd24860a32c1501872c}
The copy constructor

\begin{Desc}
\item[\hyperlink{todo__todo000002}{Todo}]add checking for NULL pointers\end{Desc}
\hypertarget{class_a_v_i_file_af7065ea3dc27ea02290f905e2535f75a}{
\index{AVIFile@{AVIFile}!$\sim$AVIFile@{$\sim$AVIFile}}
\index{$\sim$AVIFile@{$\sim$AVIFile}!AVIFile@{AVIFile}}
\subsubsection[{$\sim$AVIFile}]{\setlength{\rightskip}{0pt plus 5cm}AVIFile::$\sim$AVIFile ()\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_a_v_i_file_af7065ea3dc27ea02290f905e2535f75a}
The destructor 

\subsection{Member Function Documentation}
\hypertarget{class_a_v_i_file_a468342fdddffd3aa4e3d33ed2232193d}{
\index{AVIFile@{AVIFile}!GetFrame@{GetFrame}}
\index{GetFrame@{GetFrame}!AVIFile@{AVIFile}}
\subsubsection[{GetFrame}]{\setlength{\rightskip}{0pt plus 5cm}int AVIFile::GetFrame ({\bf Frame} $\ast$ {\em frame}, \/  int {\em frameNum})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_a_v_i_file_a468342fdddffd3aa4e3d33ed2232193d}
Read in a frame

\begin{Desc}
\item[\hyperlink{todo__todo000005}{Todo}]use 64 bit seek 

we actually don't need the frame here, we could use just a void pointer \end{Desc}

\begin{DoxyParams}{Parameters}
\item[{\em frame}]a reference to the frame object that will receive the frame data \item[{\em frameNum}]the frame number to read \end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if the frame could be read, -\/1 otherwise 
\end{DoxyReturn}
\hypertarget{class_a_v_i_file_ad18c3fdbcae2b439987c31803cdabb75}{
\index{AVIFile@{AVIFile}!GetFrameInfo@{GetFrameInfo}}
\index{GetFrameInfo@{GetFrameInfo}!AVIFile@{AVIFile}}
\subsubsection[{GetFrameInfo}]{\setlength{\rightskip}{0pt plus 5cm}int AVIFile::GetFrameInfo (off\_\-t \& {\em offset}, \/  int \& {\em size}, \/  int {\em frameNum})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_a_v_i_file_ad18c3fdbcae2b439987c31803cdabb75}
Find position and size of a given frame in the file

Depending on which index is available, search one of them to find position and frame size

\begin{Desc}
\item[\hyperlink{todo__todo000004}{Todo}]the size parameter is redundant. All frames have the same size, which is also in the mainHdr. 

all index related operations should be isolated \end{Desc}

\begin{DoxyParams}{Parameters}
\item[{\em offset}]the file offset to the start of the frame \item[{\em size}]the size of the frame \item[{\em the}]number of the frame we wish to find \end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if the frame could be found, -\/1 otherwise 
\end{DoxyReturn}
\hypertarget{class_a_v_i_file_ae3cf3009dfda33f25eaef7eed374c18c}{
\index{AVIFile@{AVIFile}!Init@{Init}}
\index{Init@{Init}!AVIFile@{AVIFile}}
\subsubsection[{Init}]{\setlength{\rightskip}{0pt plus 5cm}void AVIFile::Init (int {\em format}, \/  int {\em sampleFrequency}, \/  int {\em indexType})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_a_v_i_file_ae3cf3009dfda33f25eaef7eed374c18c}
Initialize the AVI structure to its initial state, either for PAL or NTSC format

Initialize the \hyperlink{class_a_v_i_file}{AVIFile} attributes: mainHdr, indx, ix00, idx1

\begin{Desc}
\item[\hyperlink{todo__todo000003}{Todo}]consolidate \hyperlink{class_a_v_i_file_ae3cf3009dfda33f25eaef7eed374c18c}{AVIFile::Init}, \hyperlink{class_a_v_i1_file_a10a9e391cfe38e75273b05af17ec8a54}{AVI1File::Init}, \hyperlink{class_a_v_i2_file_a2bcacacbf565fddffa27bd8be90aa62c}{AVI2File::Init}. They are somewhat redundant. \end{Desc}

\begin{DoxyParams}{Parameters}
\item[{\em format}]pass AVI\_\-PAL or AVI\_\-NTSC \item[{\em sampleFrequency}]the sample frequency of the audio content \item[{\em indexType}]pass AVI\_\-SMALL\_\-INDEX or AVI\_\-LARGE\_\-INDEX \end{DoxyParams}


Reimplemented in \hyperlink{class_a_v_i1_file_a10a9e391cfe38e75273b05af17ec8a54}{AVI1File}, and \hyperlink{class_a_v_i2_file_a2bcacacbf565fddffa27bd8be90aa62c}{AVI2File}.\hypertarget{class_a_v_i_file_aa3d26f26ef43c8da2bad6d30c88582b7}{
\index{AVIFile@{AVIFile}!operator=@{operator=}}
\index{operator=@{operator=}!AVIFile@{AVIFile}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}{\bf AVIFile} \& AVIFile::operator= (const {\bf AVIFile} \& {\em avi})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_a_v_i_file_aa3d26f26ef43c8da2bad6d30c88582b7}
The assignment operator 

Reimplemented from \hyperlink{class_r_i_f_f_file}{RIFFFile}.\hypertarget{class_a_v_i_file_a39c7a8c8385b8c43e07ecb96f05b30f1}{
\index{AVIFile@{AVIFile}!ParseList@{ParseList}}
\index{ParseList@{ParseList}!AVIFile@{AVIFile}}
\subsubsection[{ParseList}]{\setlength{\rightskip}{0pt plus 5cm}void AVIFile::ParseList (int {\em parent})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_a_v_i_file_a39c7a8c8385b8c43e07ecb96f05b30f1}
If this is not a movi list, read its contents 

Reimplemented from \hyperlink{class_r_i_f_f_file_a0844938b0264e925902eaa494d0c1749}{RIFFFile}.\hypertarget{class_a_v_i_file_aacc26adc57c2c19313089d4caeb72d2e}{
\index{AVIFile@{AVIFile}!ParseRIFF@{ParseRIFF}}
\index{ParseRIFF@{ParseRIFF}!AVIFile@{AVIFile}}
\subsubsection[{ParseRIFF}]{\setlength{\rightskip}{0pt plus 5cm}void AVIFile::ParseRIFF (void)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_a_v_i_file_aacc26adc57c2c19313089d4caeb72d2e}
Reads the directory structure of the whole RIFF file 

Reimplemented from \hyperlink{class_r_i_f_f_file_a182e500b3b9255bd7af307eea157e8a0}{RIFFFile}.\hypertarget{class_a_v_i_file_ac35dd7e4beb3da69fa6bbb79590f72e5}{
\index{AVIFile@{AVIFile}!PrintDirectoryEntryData@{PrintDirectoryEntryData}}
\index{PrintDirectoryEntryData@{PrintDirectoryEntryData}!AVIFile@{AVIFile}}
\subsubsection[{PrintDirectoryEntryData}]{\setlength{\rightskip}{0pt plus 5cm}void AVIFile::PrintDirectoryEntryData (const {\bf RIFFDirEntry} \& {\em entry})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_a_v_i_file_ac35dd7e4beb3da69fa6bbb79590f72e5}
prints out a directory entry in text form

Every subclass of \hyperlink{class_r_i_f_f_file}{RIFFFile} is supposed to override this function and to implement it for the entry types it knows about. For all other entry types it should call its parent::PrintDirectoryData.

\begin{Desc}
\item[\hyperlink{todo__todo000006}{Todo}]use 64 bit routines \end{Desc}

\begin{DoxyParams}{Parameters}
\item[{\em entry}]the entry to print \end{DoxyParams}
\hypertarget{class_a_v_i_file_a543c702c53cd565c31c32375941957ad}{
\index{AVIFile@{AVIFile}!WriteRIFF@{WriteRIFF}}
\index{WriteRIFF@{WriteRIFF}!AVIFile@{AVIFile}}
\subsubsection[{WriteRIFF}]{\setlength{\rightskip}{0pt plus 5cm}virtual void AVIFile::WriteRIFF (void)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{class_a_v_i_file_a543c702c53cd565c31c32375941957ad}
Writes out the directory structure

For all items in the directory list that have not been written yet, it seeks to the file position where that item should be stored and writes the type and length field. If the item has a name, it will also write the name field.

\begin{DoxyNote}{Note}
It does not write the contents of any item. Use WriteChunk to do that. 
\end{DoxyNote}


Reimplemented from \hyperlink{class_r_i_f_f_file_a28d27eb17b0c5166c5da3fbc4b93e675}{RIFFFile}.

Reimplemented in \hyperlink{class_a_v_i1_file_aa3e7af24cda26969bf12737f2af5ab3e}{AVI1File}, and \hyperlink{class_a_v_i2_file_aaa0ec0edbef4df8ad7505c2c575c388c}{AVI2File}.

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/cv/ext/dvgrab/\hyperlink{avi_8h}{avi.h}\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/cv/ext/dvgrab/avi.cc\end{DoxyCompactItemize}
